﻿using SqlSugar;
using System;
using System.Data;

namespace ReportDesignerServer.IRepository
{
    public interface IBaseSugarRepository<TEntity> where TEntity : class, new()
    {
        public SqlSugarScope DB { get; }
        public int Insert(TEntity entity);

        public long ExecuteReturnSnowflakeId(TEntity entity);
        public List<long> ExecuteRecordsSnowflakeId(List<TEntity> entitys);

        public int Delete(TEntity entity);

        public int Update(TEntity entity);

        public TEntity GetById(object id);
 

        public DataTable GetDataTable(string sql);

        public int ExecuteCommand(string sql);

        public List<TEntity> GetListByWhere(Expressionable<TEntity> express);
    }
}
